import React from 'react'

import './style'
import ContainerModle from '../../common/containerModle'
import ContainerViewExtend from './containerViewExtend'
import ContainerViewProxy from './containerViewProxy'
import SettingProxy from './settingProxy'

export default class QuickEnter extends React.Component{

    static defaultProps = {
        javaInterface:{
            find: '/api/portalTsLogin/element/getCommonAbstractImplData',
            save: '/api/portalTs/commonAbstractImpl/save',
            update: '/api/portalTs/commonAbstractImpl/update',
            saveOrUpdateItem: '/api/portalTs/commonAbstractImpl/saveOrUpdateItem',
            deleteItem: '/api/portalTs/commonAbstractImpl/deleteItem',
            orderItem: '/api/portalTs/commonAbstractImpl/orderItem',
        }
    }

    onSaveBeforeHandler = (setting={})=>{
        setting.title =  '快捷入口'
        setting.showType = '1'
        setting.showNumberForRow = 3
        setting.containerWidth = 100
        setting.containerHeight = 150
        setting.iconWidth = 75
        setting.iconHeight = 75
        setting.rowSpace = '10'
        setting.iconNameSpace = '10'
        setting.horizontalAlign = '0'
        setting.fontColor = '#4994F4'
        setting.linkType = '1'
        setting.titleIsAutoEnter = '0'

    }

    onLoadAfterHandler = (data)=>{

    }

    render(){

        return (
            <ContainerModle ecId={`${this && this.props && this.props.ecId || ''}_ContainerModle@a0oa20`} {...this.props} {...(this.props.location ? this.props.location.query :{})} ContainerViewProxy={ContainerViewProxy} SettingProxy={SettingProxy} onSaveBeforeHandler={this.onSaveBeforeHandler} onLoadAfterHandler={this.onLoadAfterHandler} ContainerViewExtend={ContainerViewExtend} showSharing={true}>
            </ContainerModle>
        )
    }
}